package com.gdit.zax.factory;

import java.sql.Connection;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.gdit.zax.dao.ApplyTcDao;
import com.gdit.zax.dao.AttentionDao;
import com.gdit.zax.dao.BannerPicDao;
import com.gdit.zax.dao.CollectDao;
import com.gdit.zax.dao.CommentDao;
import com.gdit.zax.dao.CourseDao;
import com.gdit.zax.dao.DynamicDao;
import com.gdit.zax.dao.FindPwdDao;
import com.gdit.zax.dao.FreebackDao;
import com.gdit.zax.dao.GroupDao;
import com.gdit.zax.dao.MedalDao;
import com.gdit.zax.dao.PlanDao;
import com.gdit.zax.dao.RemindDao;
import com.gdit.zax.dao.SchoolDao;
import com.gdit.zax.dao.SearchDao;
import com.gdit.zax.dao.SectionDao;
import com.gdit.zax.dao.SignDao;
import com.gdit.zax.dao.StartPicDao;
import com.gdit.zax.dao.UpLoadDao;
import com.gdit.zax.dao.UserDao;
import com.gdit.zax.dao.VersionDao;
import com.gdit.zax.dao.VideoRecordDao;
import com.gdit.zax.impl.ApplyTcDaoImpl;
import com.gdit.zax.impl.AttentionDaoImpl;
import com.gdit.zax.impl.BannerPicDaoImpl;
import com.gdit.zax.impl.CollectDaoImpl;
import com.gdit.zax.impl.CommentDaoImpl;
import com.gdit.zax.impl.CourseDaoImpl;
import com.gdit.zax.impl.DynamicDaoImpl;
import com.gdit.zax.impl.FindPwdDaoImpl;
import com.gdit.zax.impl.FreebackDaoImpl;
import com.gdit.zax.impl.GroupDaoImpl;
import com.gdit.zax.impl.MedalDaoImpl;
import com.gdit.zax.impl.PlanDaoImpl;
import com.gdit.zax.impl.RemindDaoImpl;
import com.gdit.zax.impl.SchoolDaoImpl;
import com.gdit.zax.impl.SearchDaoImpl;
import com.gdit.zax.impl.SectionDaoImpl;
import com.gdit.zax.impl.SignDaoImpl;
import com.gdit.zax.impl.StartPicDaoImpl;
import com.gdit.zax.impl.UpLoadDaoImpl;
import com.gdit.zax.impl.UserDaoImpl;
import com.gdit.zax.impl.VersionDaoImpl;
import com.gdit.zax.impl.VideoDaoImpl;
import com.gdit.zax.impl.VideoRecordDaoImpl;

public class DAOFactory {
	private Connection conn;
	private HttpServletRequest request;
	private HttpServletResponse response;
	
	public DAOFactory(Connection conn,HttpServletRequest request, HttpServletResponse response) {
		this.conn = conn;
		this.request = request;
		this.response = response;
	}
	
	public static DAOFactory init(Connection conn,HttpServletRequest request, HttpServletResponse response) {
		return new DAOFactory(conn, request, response);
	}
	
	
	public Connection getConn() {
		return conn;
	}

	public void setConn(Connection conn) {
		this.conn = conn;
	}

	public HttpServletRequest getRequest() {
		return request;
	}

	public void setRequest(HttpServletRequest request) {
		this.request = request;
	}

	public HttpServletResponse getResponse() {
		return response;
	}

	public void setResponse(HttpServletResponse response) {
		this.response = response;
	}


	
	
	
	
	
	public UserDao getUserDao() {
		return new UserDaoImpl(conn, request, response);
	}
	
	public DynamicDao getDynamicDao() {
		return new DynamicDaoImpl(conn, request, response);
	}
	
	public ApplyTcDao getApplyTcDao() {
		return new ApplyTcDaoImpl(conn, request, response);
	}
	
	public VideoDaoImpl getVideoDao() {
		return new VideoDaoImpl(conn, request, response);
	}
	
	public UpLoadDao getUploadDao() {
		return new UpLoadDaoImpl(conn, request, response);
	}
	
	public SchoolDao getSchoolDao() {
		return new SchoolDaoImpl(conn, request, response);
	}
	
	public StartPicDao getStartPicDao() {
		return new StartPicDaoImpl(conn, request, response);
	}
	
	public BannerPicDao getBannerPicDao() {
		return new BannerPicDaoImpl(conn, request, response);
	}

	public CourseDao getCourseDao() {
		return new CourseDaoImpl(conn, request, response);
	}
	
	public SectionDao getSectionDao() {
		return new SectionDaoImpl(conn, request, response);
	}
	
	public FreebackDao getFreebackDao() {
		return new FreebackDaoImpl(conn, request, response);
	}
	
	public AttentionDao getAttentionDao() {
		return new AttentionDaoImpl(conn, request, response);
	}
	
	public CollectDao getCollectDao() {
		return new CollectDaoImpl(conn, request, response);
	}
	
	public VideoRecordDao getVideoRecordDao() {
		return new VideoRecordDaoImpl(conn, request, response);
	}
	
	public PlanDao getPlanDao() {
		return new PlanDaoImpl(conn, request, response);
	}
	
	public SignDao getSignDao() {
		return new SignDaoImpl(conn, request, response);
	}
	
	public SearchDao getSearchDao() {
		return new SearchDaoImpl(conn, request, response);
	}
	
	public RemindDao getRemindDao() {
		return new RemindDaoImpl(conn, request, response);
	}
	
	public GroupDao getGroupDao() {
		return new GroupDaoImpl(conn, request, response);
	}
	
	public MedalDao getMedalDao() {
		return new MedalDaoImpl(conn, request, response);
	}
	
	public CommentDao getCommentDao() {
		return new CommentDaoImpl(conn, request, response);
	}
	
	public FindPwdDao getFindPwdDao() {
		return new FindPwdDaoImpl(conn, request, response);
	}
	
	public VersionDao getVersionDao() {
		return new VersionDaoImpl(conn, request, response);
	}
	
}
